package com.prj.ufdm.demo.tutorial.j2se;
/**
 *   测试 finally 在 return 前还是后 执行
 * @author Administrator
 *
 */
public class FinallyTest {
	
	public static void main(String[] args) {
		System.out.println(test1());
	}

	public static int test1() {
		int b = 20;
		try {
			System.out.println("try block:"+b);
			return b += 10;
		} catch (Exception e) {
			System.out.println("catch block");
		} finally {
			System.out.println("finally block："+ b);
		}
		return b;
	}
}
